package com.jinzhuo.rabbitmq_config;

import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import static com.jinzhuo.rabbitmq_config.Mq_provider.QUEUE_NAME;

@Component
public class Mq_consumer {
    @RabbitListener(queues = QUEUE_NAME)
    public void consumer(Message message){
        System.out.println(message);
    }
}
